package cn.tedu._05weibo.pojo.dto;
/**
 * 注册功能的DTO类
 */

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

@Data
public class UserRegDTO {
    //用户名、密码、昵称
    //@NotNull(message = "用户名不能为空值")
    //@NotEmpty(message = "用户名不能为空值和空字符串")
    //@NotBlank(message = "用户名不能为空值、空字符串和空白串")
    //@Size(min = 6, max = 12, message = "用户名长度必须在6-12位之间")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{1,7}|[A-Za-z0-9]{1,14}$", message = "用户名最长7个汉字或14个英文")
    @ApiModelProperty(value = "用户名", required = true, example = "tedu")
    private String username;
    @ApiModelProperty(value = "密码", required = true)
    private String password;
    @ApiModelProperty(value = "昵称", required = true)
    private String nickname;
}
